package com.inspur.jxpcxt.service;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;

import com.inspur.jxpcxt.constants.ServerConstants;
import com.inspur.jxpcxt.utils.CommonService;

public class TeacherCommentsService {
	@SuppressWarnings("deprecation")
	public static String TeaByClientGet(String tno,String pswd){
			//创建HttpClient对象
			HttpClient client = new DefaultHttpClient();
			//拼装路径
			String path = null;
			try {
				path = "http://"+ServerConstants.SERVER_IP+":8080/Web/LoginServlet?tno="
						+URLEncoder.encode(tno)
						+"&pswd="
						+URLEncoder.encode(pswd)
						+"&service="
						+URLEncoder.encode(ServerConstants.SERVER_TEA_COMMENTS_SERVICE,"UTF-8");
			} catch (UnsupportedEncodingException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
				return "";
			}
			return CommonService.serviceRequest(path, client);
}
}
